home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 32 (1993-02)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip
/
MegaDisc 32 (1993-02)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf
/
hyperbook
/
defaulthyperbook
(
.txt
)
next >
Wrap
HyperBook
|
1993-02-11
|
17KB
|
321 lines
"!_h}@
/* */
it = initiator() ; u = left(it,2) ; s = SUBSTR(it,3)
s = s - 5 ; newit = u || s
act = GetVisibility(newit)
do i = 1 to 5
it = u || i
call SetVisibility(it,0)
call SetVisibility(newit,~(act))
ShowMenus
/* Secret message from HB_Macros */
obj = SearchName('7:','SecretMessage')
if obj ~= '' then call HML_Delete(obj)
op = open('ar','HB_Macros','r')
text = ''
pos = seek('ar',15698)
do i = 1 to 7
t = readln('ar')
t = substr(t,13,40)
text = text || t || '0a'x
end
cl = close('ar')
note = createnote()
call scaletosize(note, 350, 90)
call setposition(note, 120, 60)
call setname(note, 'SecretMessage')
note = relocate(note, ':')
call InsertText(note,text,0)
SecretMessage
/* File info */
ob = SearchName('4:','ArtInfo')
if ob ~= '' then call HML_Delete(ob)
fn = 'HB_Macros'
actif = show('L','rexxsupport.library')
if actif = 0 then do
loadit = addlib('rexxsupport.library',0,-30,0)
actif = show('L','rexxsupport.library')
end
if actif = 1 then do
t = "ARexx 'statef()' being used : " || '0a'x || '0a'x
parse value statef(fn) with type size blk bits
t = t || ' Name : ' || fn || '0a'x
t = t || ' Type of object : ' || type || '0a'x
t = t || ' Size in bytes : ' || size || '0a'x
t = t || ' Size in blocks : ' || blk
x = 140 ; y = 90 ; w = 300 ; h = 80
end
else do
t = "DOS 'list' being used : " || '0a'x
address command 'list >ram:temp HB_macros'
t = t || '0a'x || LoadText('ram:temp')
x = 40 ; y = 110 ; w = 520 ; h = 50
end
n = createnote()
call inserttext(n, t, 0)
call scaletosize(n, w, h)
call setposition(n, x, y)
call setname(n, 'ArtInfo')
call relocate(n, ':')
FileInfo
/* List jobs */
it=right(initiator(),1)
select
when it=1 then call inform("You just clicked on" || '0a'x || "the black heading" || '0a'x || "in the list.")
when it=2 then do
ar=SearchName('2:','Note1') ; str=ReadNoteText(ar,0,1) ; oldt=DeleteText(ar,0,-1)
if str='T' then newt='New text has been put in the Note'
else newt='This is an example of a HyperText Note'
call InsertText(ar,newt,0)
end
when it=3 then do
ar=SearchName('2:','Button1') ; left=GetLeft(ar) ; top=GetTop(ar)
if left<400 then call SetPosition(ar,left+100,top)
else call SetPosition(ar,left-100,top)
end
when it=4 then do
ar=SearchName('2:','Drawing1') ; w=GetWidth(ar) ; h=GetHeight(ar)
if w<120 then call Scale(ar,150)
else call Scale(ar,67)
end
when it=5 then do
ar=SearchName('2:','PicFrame') ; sh=ShadowStyle(ar,0)
if sh=1 then do
call SetBorder(ar,5) ; call SetShadow(ar,3) ; call ShadowStyle(ar,2)
end
else do ; call SetShadow(ar,1) ; call ShadowStyle(ar,1) ; end
end
when it=6 then do
ar=SearchName('2:','List1') ; a=' I change my own wording' ; b=' This is a new wording'
t=GetItemText(ar || '/6')
if t=a then oldt=SetItemText(ar || '/6',b)
else oldt=SetItemText(ar || '/6',a)
end
ListJobs
/* Table into List */
arg = SearchName('6:','Table')
if arg ~= '' then call HML_Delete(arg)
op = open('ta','HB_Macros','r')
se = seek('ta',4401)
li = createlist()
do i = 1 to 7
t = readln('ta')
t1 = substr(t,12,19) ; it = appenditem(li, t1, 1)
if i = 7 then leave
t1 = substr(t,35,22) ; it = appenditem(li, t1, 1)
t1 = substr(t,60,20) ; it = appenditem(li, t1, 1)
end
cl = close('ta')
call scaletosize(li, 200, 180)
call setposition(li, 300, 10)
call setname(li, 'Table')
li = relocate(li, ':')
Table
/* Subtitles from article */
call BeginPrompt("Hang on ...")
obj = SearchName('5:','SubHeadings')
if obj ~= '' then call HML_Delete(obj)
com = 'search >ram:tmp HB_Macros [43m NONUM'
address command com
if open(fr, 'ram:tmp', 'r') then do
list = createlist()
do forever
lin = readln(fr)
if length(lin) > 10 then do
part = substr(lin,11,length(lin) - 16)
end
if eof(fr) then leave
item = appenditem(list, part, 1)
end
call close(fr)
call scaletosize(list, 350, 136)
call setposition(list, 20, 60)
call setname(list, 'Subheadings')
list = relocate(list, ':')
obj = SearchName('5:','Bytes')
num = NumElements(obj)
do i = 1 to num
item = obj || '/' || i ; title = list || '/' || i
text = GetItemText(item) ; gap = index(text," ")
start = left(text,gap-1)
amt = right(text,length(text) - gap)
cmd = 'call ShowTextRange("HB_Macros",' || start || ',' || amt || ')'
call SetActionRexx(title, cmd)
end
title = list || '/' || 6
cmd = "call Inform('Click on either of the next two items.')"
call SetActionRexx(title, cmd)
title = list || '/' || 9
cmd = "call Inform('Click on any of the next five items.')"
call SetActionRexx(title, cmd)
end
SubHeadings
"TitleNote"
An article about HyperBook,
and some related demos
"TwoNotes"
Without ARexx
you will be able to
the demo pages,
but not run them. If you try, you'll get an 'ARexx
unavailable' message. Read the article
anyway!
With ARexx
, running the demos will change the unit.
If you then save, reload, and run it, most of the
demos will have lost their point. Think before you save!
Click here when you've read this
"Symbols"
1 2 3 4 5 6
Navigation symbols
Go to previous page
Next page
First page
Last page
Page you came from
Any page
Demos
On pages 2 - 7
To Quit
Use the Menu
To hide this note
Click here
"NoteOnARexx"
Click here for two
important notes
"Navigation"
Click here for
navigation advice
"ReadArt"
:c/fullview :hyperbook/HB_Macros
Click here to
see the article
Page1
Button1
/say "The Button's object number is" initiator()
A Button
Note1
4call inform("You just clicked on the Note example.")
This is an example
of a HyperText Note
"Script2"
Each item in this list has been given an 'action'.
List1
#We are a list. Click on any of us :
! I change the wording of the Note
$ I change the position of the Button
! I change the size of the Drawing
# I change the shadow of the Picture
I change my own wording
Drawing1
call inform("This drawing is at " || GetLeft(initiator()) || '0a'x || "pixels from the left" || '0a'x || "and" GetTop(initiator()) "from the top.")
"Script1"
Five types of 'object' :
Each of these objects has been given an
'action'
"PicFrame"
call Inform('This frame is ' || GetWidth(initiator()) || ' pixels wide,' || '0a'x || 'and it is ' || GetHeight(initiator()) || ' pixels high')
Picture1
call Inform("This picture is " || GetWidth(initiator()) || ' pixels wide,' || '0a'x || 'and it is ' || GetHeight(initiator()) || ' pixels high')
Ram Disk:
Picture
Page2
"Note6"
Default
Empty bin
Print page
Print text
Tiny window
About
"Note7"
Create page
Delete page
Edit page
Load page
Save page
Merge page
Master page
Show page links
"Note8"
Find object
Find text
Find page
Find again
Read a text file
Edit a text file
Display a picture
Delete a file
Run word processor
Run paint program
"Note9"
Display coordinates
Interlace text
Main control panel
Hide title bar
Buttons
Edit invisible objects
Save icons
Save backup files
Workbench
Edit default object
Select word processor
Select paint program
"Note10"
Run macro
Run command
Create macro
Delete macro
Edit macro
Load macro
Save macro
"Note1"
Project
"Note2"
"Note3"
Commands
"Note4"
Preferences
"Note5"
ARexx
"Script"
This is a look-alike of the full HyperBook menu.
It doesn't work, of course.
A click on any of the red headings toggles its own
list on/off, and turns 'off' any other 'on' list.
None of the sub-items are shown here.
Page3
Note1
Click here to obtain information
about the file containing the article
Page4
"ClickHere"
Click here to create a list of article subheadings,
and then on any item in the list to read the patch.
"Bytes"
355 562
917 764
1681 1482
3163 2746
5909 3042
8951 40
8991 801
9792 314
10106 41
10147 868
11015 1091
12106 2078
14184 1174
15358 1074
Page5
"Script"
To read a table from the
article and reformat it
as a HyperBook List
"ClickHere"
Click here
Page6
"ClickHere"
Click here to see the hidden message
Page7
garnet.font